package com.qf.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qf.pojo.OrderDetails;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.tomcat.websocket.BackgroundProcess;

import java.util.List;

@Mapper
public interface OrderDetailsMapper extends BaseMapper<OrderDetails> {
    @Select("SELECT * FROM order_details o LEFT JOIN goods g ON o.goods_id=g.goods_id LEFT JOIN cart c ON c.goods_id=g.goods_id ${ew.customSqlSegment}")
    List<OrderDetails> findByOrderId(@Param(Constants.WRAPPER) QueryWrapper<OrderDetails> wrapper);
}
